package users;

import info.Conference;

import java.util.LinkedList;
import java.util.List;

/**
 * The Reviewer class is modeled after the functions and responsibilities
 * that a Reviewer will have.  A Reviewer responds to a Subprogram Chair,
 * who assigns manuscripts to their Reviewers.  A Reviewer reads their
 * assigned manuscripts and assesses it for various qualities.  Then they
 * submit a review form to the Subprogram Chair.
 * @author Aaron Chen
 * @author Lun-Wei Chang
 * @version skeleton
 */
public class Reviewer extends AbstractRole {
  
  /** The ID that this role is represented by. */
  public static final int ROLE_ID = 4;
  
  /** The name of this role. */
  public static final String ROLE_NAME = "Reviewer";

  /** The ID of the Subprogram Chair that the Reviewer responds to. */
  private long my_subprogram_chair;

  /** The list of IDs of manuscripts that the Reviewer is responsible for
   * reviewing. */
  private List<Long> my_manuscripts;

  /**
   * Constructs a new Reviewer role.
   * @param the_user The user that this role belongs to.
   * @param the_conference The conference that this role belongs to.
   * @param the_spc The Subprogram Chair that this Reviewer responds to.
   */
  public Reviewer(final User the_user,
                  final Conference the_conference,
                  final long the_spc) {
    super(0, the_user.getID(), the_conference.getID());
    my_subprogram_chair = the_spc;
    my_manuscripts = new LinkedList<Long>();
  }
  
  /**
   * Constructs a new Reviewer role.
   * @param the_role_id The ID for this particular role assignment.
   * @param the_user_id The ID of the user that this role belongs to.
   * @param the_conference_id The conference that this role belongs to.
   * @param the_spc The Subprogram Chair that this Reviewer responds to.
   * @param the_manuscript_ids The list of manuscripts.
   */
  public Reviewer(final long the_role_id,
                  final long the_user_id,
                  final long the_conference_id,
                  final long the_spc,
                  final List<Long> the_manuscript_ids) {
    super(the_role_id, the_user_id, the_conference_id);
    my_subprogram_chair = the_spc;
    my_manuscripts = the_manuscript_ids;
  }
 
  /** 
   * Returns the SPC correspond to this reviewer. 
   * @return SubprogramChair my_subprogram_chair
   * */
  public long getSubprogramChair() {
    return my_subprogram_chair;
  }
  
  /** 
   * Returns a list of manuscripts assigned to the reviewer.  
   * @return List my_manuscripts
   * */
  public List<Long> getManuscripts() {
    return my_manuscripts;
  }
  
  /** 
   * Creates a new review.
   */
  public void createReview() {
    
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public int getRoleID() {
    return ROLE_ID;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String getRoleName() {
    return ROLE_NAME;
  }
  
  /**
   * {@inheritDoc}
   */
  @Override
  public String toString() {
    return ROLE_NAME;
  }
  
}
